package com.tanhua.model.vo;

import com.tanhua.model.domain.UserInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

/**
 * @author: Liking
 * @description
 * @date: 2023/7/31 14:32
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FriendVo implements Serializable {
    private Long id; //用户id
    private String avatar; //用户头像
    private String nickname; //昵称
    private String gender; //性别
    private Integer age; //年龄
    private String city; //城市
    private String education;//教育
    private Integer marriage; //婚姻状态
    private Integer matchRate = 50; //匹配度
    private Boolean alreadyLove; //是否喜欢

    public static FriendVo init(UserInfo info,Boolean alreadyLove) {
        FriendVo vo = new FriendVo();
        BeanUtils.copyProperties(info,vo);
        vo.setMatchRate(50);
        vo.setAlreadyLove(alreadyLove);
        return vo;
    }
}
